﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AuthorityList.aspx.cs" Inherits="Presention.AuthorityList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 304px;
        }
        .style2
        {
            width: 263px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:Panel ID="SearchAuthorityPanel" runat="server" GroupingText = "Search Authority">
        AuthorityName&nbsp;
        <asp:TextBox ID="AuthorityNameTextBox" runat="server" Width="137px"></asp:TextBox>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Level
        <asp:DropDownList ID="LevelDropDownList" runat="server" Height="23px" 
            Width="150px">
        </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="SearchButton" runat="server" Text="Search" 
            onclick="SearchButton_Click"  />
</asp:Panel>
    <asp:Panel ID="Panel1" runat="server" GroupingText = "Authority List">
        <asp:Button ID="CreateButton" runat="server" Text="Create New Authority" 
            Width="172px" onclick="CreateButton_Click" />
        <br />
        <br />
        <table border="1" cellpadding="0" cellspacing="0" class="style1">
            <asp:Repeater ID="Reapeater1" runat="server">
                <HeaderTemplate>
                    <tr>
                        <td width="110" height="30" align="center" valign="middle" bgcolor="#999999"><font face="Times New Roman">AuthorityName</font></td>
                        <td width="110" height="30" align="center" valign="middle" bgcolor="#999999"><font face="Times New Roman">LevelName</font></td>
                        <td width="280" height="30" align="center" valign="middle" bgcolor="#999999"><font face="Times New Roman"></font></td>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td align="center" height="30" valign="middle" width="90"><%#DataBinder.Eval(Container.DataItem,"AuthorityName") %></td>
                        <td align="center" height="30" valign="middle" width="90"><%#DataBinder.Eval(Container.DataItem, "Level.LevelName")%></td>
                            <td height="30" width="120">
                             <asp:Button ID="UpdateButton" runat="server" align="center" CommandArgument='<%#Eval("AuthorityId") %>' onclick="UpdateButton_Click"
                                Text="Update" Width="55px" />
                             <asp:Button ID="DeleteButton" runat="server" align="center" CommandArgument='<%#Eval("AuthorityId") %>' onclick="DeleteButton_Click" 
                                Text="Delete" Width="55px" />
                            </td>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </asp:Panel>
</asp:Content>
